/**  
* @author renbangjie renbangjie@126.com  
* @date 2015-9-15 下午4:54:38
* @version V1.0  
* <b>Copyright (c)</b> 2014医信金融信息服务（上海）有限公司-版权所有<br/>
*/
package com.yjd.comm.wal.enums;

import com.yjd.comm.activity.enums.AppTypeEnum;

/**
 * 体验金类型
 * @author renbangjie renbangjie@126.com
 * @date 2015-9-15 下午4:54:38
 */
public enum ExperienceType {

	REGISTER(1, "注册送体验金"),
	INTO_MONEY(2, "投资送体验金"),
	EXTENSION_INTO_MONEY(3, "邀请送体验金"),
	YEAR_ACTIVITY(4, "2016年会活动送体验金"),
	TWO_YEAR_ACTIVITY(5, "两周年活动送体验金"),
	NEWYEAR2016_ACTIVITY(6, "2016跨年活动送体验金");
	
	
	private int code;
	private String lable;
	
	private ExperienceType(int code, String lable) {
		this.code = code;
		this.lable = lable;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getLable() {
		return lable;
	}

	public void setLable(String lable) {
		this.lable = lable;
	}
	
	public static ExperienceType convertExperienceType(AppTypeEnum appTypeEnum)throws Exception{
		ExperienceType experienceType = null;
		if(appTypeEnum.getCode().equals(AppTypeEnum.MEETING2016.getCode())){
			experienceType = ExperienceType.YEAR_ACTIVITY;
		}else if(appTypeEnum.getCode().equals(AppTypeEnum.YDJTWOYEAR.getCode())){
			experienceType = ExperienceType.TWO_YEAR_ACTIVITY;
		}else if(appTypeEnum.getCode().equals(AppTypeEnum.NEWYEAR2016.getCode())){
			experienceType = ExperienceType.NEWYEAR2016_ACTIVITY;
		}
		return experienceType;
	}
}
